package com.ror.java.se.map.treemap;

import java.util.TreeMap;

public class Demo01TreeMap {
    public static void main(String[] args) {
        //id降序=id从大到小排序
        TreeMap<Integer, String> idNameMap = new TreeMap<>(((o1, o2) -> o2 - o1));
        idNameMap.put(213, "xrb");
        idNameMap.put(92613, "api");
        idNameMap.put(42062, "bottle152");
        idNameMap.put(33989, "funshiki");
        idNameMap.entrySet().forEach(System.out::println);
    }
}
